Added kalshi bet predictor example#85
Conversation
milo157
left a comment
There was a problem hiding this comment.
More code hygiene things but otherwise I think it looks good.
I would add a basic readme on:
- What this repo contains
- What order/commands should I use to run (ie: pip install requirements, find markets, cerebrium deploy and then compare etc)
| poly_market = getMarket(False, poly_slug) | ||
| question = poly_market['question'] # we use polymarket because they have direct question | ||
|
|
||
| kalshi_real_yes = float(kalshi_market['market']['yes_ask']) |
There was a problem hiding this comment.
Are kalshi and polymarket returning values in the same way? I would handel the yes/no in the get market function so it makes this easier to follow and so it handles they have the same return format
There was a problem hiding this comment.
No, they have different response schemas but I think I can refactor for cleaner code
| } | ||
|
|
||
| try: | ||
| async with session.post(endpoint_url, headers=headers, data=payload) as response: |
There was a problem hiding this comment.
I think axios might be much clearner than aiohttp. There a reason you used it?
There was a problem hiding this comment.
I'm not sure I understand. How would I use Axios in a python script? Axios is used in node
| total_markets = len(results) | ||
|
|
||
| kalshi_edges = [r['kalshi_edge'] for r in results] | ||
| total_kalshi_edge = sum(kalshi_edges) |
There was a problem hiding this comment.
Its tough to know if this is a count or money. Also is money in dollars or cents?
There was a problem hiding this comment.
I made it more clear. Money is in cents.
No description provided.